/*=======用户名===========*/
document.querySelector(".username").onblur = function (){
    var username = document.querySelector(".username").value;
    if(username == ""||username ==null){
        document.querySelector(".username-msg").innerText="用户名不能为空";

    }else if(!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(username)){
        document.querySelector(".username-msg").innerText="请输入正确的手机号";
    }else{
        document.querySelector(".username-msg").innerText="";
    }
}
/*==========验证码============*/
document.querySelector(".password").onblur = function (){
    var password = document.querySelector(".password").value;
    if(password==""||password==null){
        document.querySelector(".password-msg").innerText="请输入密码";
    }else if (!/^[\w_-]{6,16}$/.test(password)){
        document.querySelector(".password-msg").innerText="密码格式不对";
    }else{
        document.querySelector(".password-msg").innerText="";

    }
}